<?php

namespace app\common\model\search;

trait DiseaseTypeSearch
{
    //病种简称
    public function searchReferredNameAttr($query, $value, $data)
    {
        return $query->whereLike('diseaseTypeName', trim($value));
    }

    //标准病种名
    public function searchNameAttr($query, $value, $data)
    {
        return $query->whereLike('icdDiseaseTypeList.icdDiseaseTypeName', trim($value));
    }

    //病种编码
    public function searchIcdAttr($query, $value, $data)
    {
        return $query->whereLike('icdDiseaseTypeList.diseaseCodePrefix', trim($value));
    }

}